Aliasing is a fundamental problem of computer graphics. Anti-aliasing alleviates the problem of aliasing, or high-frequency noise due to undersampling. Current anti-aliasing techniques are typically expensive for real-time rendering, in particular for games. However, performance on modern graphics hardware has reached a point where anti-aliasing is not a luxury, but is an expected feature. For example, graphics benchmarking reviews indicate that 2× multisample anti-aliasing is now a minimum even for hardware in the mid-price ranges.
Several approaches to anti-aliasing have been developed. Known solutions typically employ a box filter over pixel sub-samples, which provides some improvement in the displayed result. Two popular approaches to anti-aliasing on modern graphics hardware are supersampling and multisample anti-aliasing (MSAA). Supersampling is typically performed by rendering the scene at a higher resolution and then downsampling to the target resolution. Supersampling is expensive in terms of both performance and memory bandwidth, however the results tend to have a high quality since the entire scene is rendered at a higher resolution. Downsampling is performed in a processing step called a resolve, which is the aggregation of the samples with filtering. MSAA is an alternative to supersampling and is the predominant method of anti-aliasing for real-time graphics on current consumer GPUs. A third approach was also recently introduced, called coverage sampling which aims to produce a quality level similar to MSAA but with a reduced memory requirement.
In a multisampling approach whenever one or more subsamples in a pixel are covered by a polygon, then a single color contribution of the polygon is calculated for that pixel, and this color value is stored for each covered subsample location. We will refer to the buffer in which this data is stored as the MSAA color buffer. If depth-buffering is being performed then a unique depth value is also calculated for each subsample and is stored in an MSAA depth buffer. When the scene is ready for display, a resolve is performed (typically only the MSAA color buffer is resolved, since the depth information is not displayed on screen). In most implementations, a simple box filter is used that averages the subsample information. Hardware MSAA modes are characterized by the pattern of the sampling grid. Most graphics hardware units employ a non-uniform grid. FIG. 1A shows example anti-aliasing patterns 102, 104, and 106. In FIG. 1B, the left pixel 108 shows the area contribution by a primitive. In MSAA, the area is approximated by using sub-pixel samples, as shown in pixel 110.
It is possible to increase the quality of images by simply increasing the number of samples. However, as the number of sample increases, memory and processing costs greatly increase. It would therefore by desirable to provide a method to improve anti-aliasing quality by advantageously use existing graphics processing hardware without increasing the number of samples.
The drawings represent aspects of various embodiments for the purpose of disclosing the invention as claimed, but are not intended to be limiting in any way.